package top.linuyx.service;

import top.linuyx.pojo.param.VerificationCodeSimpleMailParam;

/**
 * @Author Linuyx
 * @Description VerificationCodeService接口
 * @Date Created in 2021-04-25 18:46
 */
public interface VerificationCodeService {

    /**
     * 发送绑定邮箱验证码(验证发送要求)
     *
     * @param simpleMailParam 简单邮件请求体
     */
    void sendBindEmailVerificationCode(VerificationCodeSimpleMailParam simpleMailParam);

    /**
     * 发送绑定邮箱验证码(验证发送要求)
     *
     * @param simpleMailParam 简单邮件请求体
     */
    void sendUpdatePasswordVerificationCode(VerificationCodeSimpleMailParam simpleMailParam);

    /**
     * 发送绑定邮箱验证码(异步执行)
     *
     * @param key RedisKey格式
     * @param username 当前登录用户
     * @param verificationCode 验证码
     * @param simpleMailParam 简单邮件请求体
     */
    void sendVerificationCodeAsync(String key, String username, String verificationCode, VerificationCodeSimpleMailParam simpleMailParam);

}
